﻿using System;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Startup.Project.Classes;
using Startup.Project.Interfaces;
using Startup.Shell.Domain;

namespace Startup.Shell.ModelDesignerPreview
{
	public class LeftPanelPreview : IDesignerPreview
	{
		public PreviewContainer LeftChild { get; set; }
		public PreviewContainer RightChild { get; set; }

		public LeftPanelPreview()
		{
			LeftChild = new PreviewContainer();
			RightChild = new PreviewContainer();
		}

		public override ImageSource PreviewImage
		{
			get { return new BitmapImage(new Uri("/Startup.Shell;component/Resources/LeftPanel.png", UriKind.RelativeOrAbsolute)); }
		}

		public override PreviewContainer[] Children
		{
			get { return new[] { LeftChild, RightChild }; }
		}

		public override IDesignerPreview CreateInstance()
		{
			return new LeftPanelPreview();
		}

		public override UiContainer GetContainer(ClassBase dataContextType, StartupProperty property)
		{
			return new GridContainer(Orientation.Horizontal, 20, 80);
		}
	}
}
